package com.feizi.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.feizi.entity.OrderdetailEntity;
import com.feizi.entity.OrderinfoEntity;

public interface OrderMapper {
	/**
	 * 根据订单号查询订单
	 * @param orderid
	 * @return
	 */
	public List<OrderinfoEntity> findOrderinfo(@Param("orderid")String orderid);
	/**
	 * 根据用户查询订单
	 * @param f_uid
	 * @return
	 */
	public List<OrderinfoEntity> findOrderif(OrderinfoEntity oie);
	/**
	 * 根据订单号查询订单详情
	 * @param orderid
	 * @return
	 */
	public List<OrderdetailEntity> findOrderdetail(@Param("orderid")String orderid);
	/**
	 * 根据订单号查询该订单未评价的产品
	 * @param orderid
	 * @return
	 */
	public int findOdStatus(@Param("orderid")String orderid);
	/**
	 * 付款
	 * @param orderid
	 * @return
	 */
	public int upOrderinfo(@Param("orderid")String orderid);
	/**
	 * 修改订单详情里的状态
	 * @param id
	 * @return
	 */
	public int upOdStatus(int id);
	/**
	 * 收货
	 * @param orderid
	 * @return
	 */
	public int upGoods(@Param("orderid")String orderid);
	/**
	 * 评价
	 * @param orderid
	 * @return
	 */
	public int upEstimate(@Param("orderid")String orderid);
	/**
	 * 添加订单主表
	 * @param oie
	 * @return
	 */
	public int addOrderinfo(OrderinfoEntity oie);
	/**
	 * 添加订单详情表
	 * @param ode
	 * @return
	 */
	public int addOrderdeteil(OrderdetailEntity ode);
}
